﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace MidSoft
{
    public partial class MidSoft : System.Web.UI.MasterPage
    {
        public bool bMenuMainSelected = false;
        public bool bMenuRegisterSelected = false;
        public bool bMenuYearCheckupSelected = false;
        public bool bMenuTransferLogoutSelected = false;
        public bool bMenuPetManageSelected = false;
        public bool bMenuSearchSelected = false;
        public bool bMenuStockbreedingSelected = false;
        public bool bMenuStreetCommunitySelected = false;
        public bool bMenuSysSelected = false;
        protected void Page_Load(object sender, EventArgs e)
        {
            //取得模块名称；
            string strTemp = Request.Url.ToString();
            strTemp = strTemp.Substring(0,strTemp.LastIndexOf("/"));
            strTemp=strTemp.Substring(strTemp.LastIndexOf("/")+1);
            //设置相应菜单样式
            switch (strTemp)
            {
                case "Main":
                    bMenuMainSelected = true;
                    break;
                case "Register":
                    bMenuRegisterSelected = true;
                    break;
                case "YearCheckup":
                    bMenuYearCheckupSelected = true;
                    break;
                case "TransferLogout":
                    bMenuTransferLogoutSelected = true;
                    break;
                case "PetManage":
                    bMenuPetManageSelected = true;
                    break;
                case "Search":
                    bMenuSearchSelected = true;
                    break;
                case "Stockbreeding":
                    bMenuStockbreedingSelected = true;
                    break;
                case "StreetCommunity":
                    bMenuStreetCommunitySelected = true;
                    break;
                case "Sys":
                    bMenuSysSelected = true;
                    break;
            }
        }
    }
}